/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.wpi.first.wpilibj.defaultCode;

import edu.wpi.first.wpilibj.DigitalInput;
import java.util.TimerTask;

/**
 *
 * @author Mark
 */
public class BeamSensor
{
    int counter = 0;

    int anothercounter = 0;

    DigitalInput sensor;

    public BeamSensor()
    {
        sensor = new DigitalInput(4,7);
    }
    /**
     * This method will be called through the IThroughBeamCallback method.
     * If there is a break in the through beam, this method returns true. Otherwise,
     * return false
     * @return
     */
    boolean isTriggered()
    {
        System.out.println("Sensor is: " + sensor.get());

        if(sensor.get())
        {
            return true;
        }
        else
        {
            return false;
        }

    }
}
